// 配置路由信息
import Vue from 'vue';
import VueRouter from 'vue-router';
// 使用插件
Vue.use(VueRouter);

import Home from '@/pages/Home'
import Search from '@/pages/Search'
import Login from '@/pages/Login'
import Register from '@/pages/Register'

const router = new VueRouter({
    routes: [
        {
            path:'/home',
            name:"home",
            component:Home,
            meta: { show:true }
        },
        {
            path:'/search/:keyw',
            name:'Search',
            component:Search,
            meta: { show:true }
        },
        {
            path:'/login',
            component:Login,
            meta: { show:false }
        },
        {
            path:'/register',
            component:Register,
            meta: { show:false }
        },
        {
            path:"*",
            redirect:"/home"

        }
    ]
})
export default router